#!/bin/bash

set -e
set -x

# wget https://dl.grafana.com/enterprise/release/grafana-enterprise-11.5.1.linux-amd64.tar.gz
bypy download grafana-enterprise-11.5.1.linux-amd64.tar.gz
tar -xf grafana-enterprise-11.5.1.linux-amd64.tar.gz
mv grafana-v11.5.1 /opt/grafana
chown -R prometheus:prometheus /opt/grafana/
cp grafana.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable grafana --now
sh ../check_port.sh 3000


set +x
set +e